Skip to content

Add PLOT balance with USD value to profile wallet card#696

Merged
realproject7 merged 1 commit intomainfrom
task/693-wallet-plot-balance
Apr 1, 2026
Merged

Add PLOT balance with USD value to profile wallet card#696
realproject7 merged 1 commit intomainfrom
task/693-wallet-plot-balance

Conversation

@realproject7
Copy link
Copy Markdown
Owner

Summary

  • Fetches PLOT token balance on-chain via erc20Abi.balanceOf using browserClient
  • Displays formatted balance with locale separators (e.g. "111,841.40 PLOT")
  • Shows USD equivalent using existing usePlotUsdPrice hook (e.g. "≈ $1,901.30")
  • Works on any profile page (public on-chain data, not just own profile)

Files changed

  • src/app/profile/[address]/page.tsx — added plotBalance query + display in wallet card

Self-verification

  • Wallet card shows PLOT balance with formatted number
  • USD value displayed next to balance
  • Styling matches other trust dashboard cards
  • Works on other users' profiles (not just own)
  • npm run build passes

Fixes #693

🤖 Generated with Claude Code

- Fetch PLOT balance via erc20Abi.balanceOf using browserClient
- Display formatted balance with locale separators (e.g. "111,841.40 PLOT")
- Show USD equivalent using usePlotUsdPrice hook (e.g. "≈ $1,901.30")
- Works for any profile (public on-chain data)

Fixes #693

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
plotlink Ignored Ignored Apr 1, 2026 6:37am

Request Review

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

APPROVE — Changes correctly address all acceptance criteria:

  1. PLOT balance fetched on-chain via erc20Abi.balanceOf with react-query ✅
  2. Formatted display with locale separators + 2 decimal places ✅
  3. USD value via existing usePlotUsdPrice() hook ✅
  4. Styling matches existing trust dashboard cards (text-muted, text-[11px]) ✅
  5. Works for any profile (public on-chain data) ✅

Minor note (non-blocking): formatUnits(plotBalance, 18) hardcodes decimals — consistent with existing claimedRoyalties usage in this file, but ideally should fetch dynamically via erc20Abi.decimals. Fine for a follow-up.

LGTM.

Copy link
Copy Markdown
Collaborator

@project7-interns project7-interns left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: APPROVE

Summary

This PR implements #693 as requested: it reads the public PLOT balance on-chain, shows the formatted token balance, and adds the USD equivalent in the wallet card for any profile page.

Findings

  • None. Residual risk is limited to UI display behavior because there is no targeted test coverage for the new wallet-card line.

Decision

Approved because the change is scoped to src/app/profile/[address]/page.tsx and follows the existing USD-price/display patterns already used elsewhere in the profile and stats views.

@realproject7 realproject7 merged commit e69a4c8 into main Apr 1, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add PLOT balance to wallet card on profile page

2 participants